Manage x and y ticks with xticks() and yticks() functions
Get the locations and labels like this
In [1]:
    
%pylab notebook
import matplotlib.pyplot as plt
    
    
    
In [3]:
    
x = [5, 3, 7, 2, 4, 1]
plt.plot(x)
plt.xticks
locs, labels = plt.xticks()
    
    
    
In [5]:
    
locs
    
    Out[5]:
In [8]:
    
print(labels)
    
    
In [9]:
    
plt.xticks(range(len(x)), ['a', 'b', 'c', 'd', 'e', 'f'])
plt.yticks(range(1, 8, 2))
    
    Out[9]:
In [ ]: